﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Common;
using LLFM.CAT.Model;
using LLFM.CAT.Service;
using System.Configuration;

public partial class Ajax_LoginAjax : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        string tel = RequestHelper.GetString("tel").Trim();
        string result = "请填写正确的手机号！";
        if (Common.DataValidate.IsMobileNumber(tel))
        {
            M_UserInfo userInfo = UserService.GetUserInfoByTelAndStatus(tel, 1);
            if (userInfo != null)
            {
                result ="true";
                HttpContext.Current.Session[ConfigurationManager.AppSettings["loginkey"].ToString()] = userInfo;
            }
            else
            {
                result = "请先注册！";
            }
        }
        Response.Write(result);
        Response.End();
    }
}